<div id="main">
    <h1 class="page-title">Class: _BasicDataSource</h1>
  
    <section>
      <header>
        <h2>
          <span class="attribs"><span class="type-signature"></span></span
          >_BasicDataSource<span class="signature"
            >(id, parent, options, name)</span
          ><span class="type-signature"></span>
        </h2>
  
        <div class="class-description">平台 DataSource 类</div>
      </header>
  
      <article>
        <div class="container-overview">
          <h2>Constructor</h2>
  
          <h4 class="name" id="_BasicDataSource">
            <span class="type-signature"></span>new _BasicDataSource<span
              class="signature"
              >(id, parent, options, name)</span
            ><span class="type-signature"></span>
          </h4>
  
          <h5>Parameters:</h5>
  
          <table class="params">
            <thead>
              <tr>
                <th>Name</th>
  
                <th>Type</th>
  
                <th class="last">Description</th>
              </tr>
            </thead>
  
            <tbody>
              <tr>
                <td class="name"><code>id</code></td>
  
                <td class="type">
                  <span class="param-type">String</span>
                </td>
  
                <td class="description last">唯一标识</td>
              </tr>
  
              <tr>
                <td class="name"><code>parent</code></td>
  
                <td class="type">
                  <span class="param-type">simpleMap</span>
                </td>
  
                <td class="description last">simpleMap 地图实例化对象</td>
              </tr>
  
              <tr>
                <td class="name"><code>options</code></td>
  
                <td class="type">
                  <span class="param-type">Object</span>
                </td>
  
                <td class="description last">选项</td>
              </tr>
  
              <tr>
                <td class="name"><code>name</code></td>
  
                <td class="type">
                  <span class="param-type">String</span>
                </td>
  
                <td class="description last">平台数据名称</td>
              </tr>
            </tbody>
          </table>
  
          <dl class="details">
            <dt class="tag-source">Source:</dt>
            <dd class="tag-source">
              <ul class="dummy">
                <li>
                  <a href="#">BasicDataSource.js</a>,
                  <a href="#">line 11</a>
                </li>
              </ul>
            </dd>
          </dl>
        </div>
  
        <h3 class="subsection-title">Members</h3>
  
        <h4 class="name" id="show">
          <span class="type-signature"></span>show<span
            class="type-signature"
          ></span>
        </h4>
  
        <div class="description">是否显示图层</div>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">BasicDataSource.js</a>,
                <a href="#">line 46</a>
              </li>
            </ul>
          </dd>
        </dl>
  
        <h4 class="name" id="StartClickEvent">
          <span class="type-signature"></span>StartClickEvent<span
            class="type-signature"
          ></span>
        </h4>
  
        <div class="description">鼠标左键点开启控制开关</div>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">BasicDataSource.js</a>,
                <a href="#">line 58</a>
              </li>
            </ul>
          </dd>
        </dl>
  
        <h4 class="name" id="StartRightClickEvent">
          <span class="type-signature"></span>StartRightClickEvent<span
            class="type-signature"
          ></span>
        </h4>
  
        <div class="description">鼠标右键开启控制开关</div>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">BasicDataSource.js</a>,
                <a href="#">line 78</a>
              </li>
            </ul>
          </dd>
        </dl>
  
        <h3 class="subsection-title">Methods</h3>
  
        <h4 class="name" id="AddEntitys">
          <span class="type-signature"></span>AddEntitys<span class="signature"
            >(Entitys)</span
          ><span class="type-signature"></span>
        </h4>
  
        <div class="description">添加图层元素</div>
  
        <h5>Parameters:</h5>
  
        <table class="params">
          <thead>
            <tr>
              <th>Name</th>
  
              <th>Type</th>
  
              <th class="last">Description</th>
            </tr>
          </thead>
  
          <tbody>
            <tr>
              <td class="name"><code>Entitys</code></td>
  
              <td class="type">
                <span class="param-type">Array</span>
              </td>
  
              <td class="description last">元素集合</td>
            </tr>
          </tbody>
        </table>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">BasicDataSource.js</a>,
                <a href="#">line 239</a>
              </li>
            </ul>
          </dd>
        </dl>
  
        <h4 class="name" id="AddLayer">
          <span class="type-signature"></span>AddLayer<span class="signature"
            >(DataSource)</span
          ><span class="type-signature"></span>
        </h4>
  
        <div class="description">添加图层组</div>
  
        <h5>Parameters:</h5>
  
        <table class="params">
          <thead>
            <tr>
              <th>Name</th>
  
              <th>Type</th>
  
              <th class="last">Description</th>
            </tr>
          </thead>
  
          <tbody>
            <tr>
              <td class="name"><code>DataSource</code></td>
  
              <td class="type">
                <span class="param-type">DataSource</span>
              </td>
  
              <td class="description last">添加子图层</td>
            </tr>
          </tbody>
        </table>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">BasicDataSource.js</a>,
                <a href="#">line 263</a>
              </li>
            </ul>
          </dd>
        </dl>
  
        <h4 class="name" id="Adds">
          <span class="type-signature"></span>Adds<span class="signature"
            >(platformArray)</span
          ><span class="type-signature"></span>
        </h4>
  
        <div class="description">一次性添加多个对象</div>
  
        <h5>Parameters:</h5>
  
        <table class="params">
          <thead>
            <tr>
              <th>Name</th>
  
              <th>Type</th>
  
              <th class="last">Description</th>
            </tr>
          </thead>
  
          <tbody>
            <tr>
              <td class="name"><code>platformArray</code></td>
  
              <td class="type">
                <span class="param-type">Array</span>
              </td>
  
              <td class="description last">对象数据</td>
            </tr>
          </tbody>
        </table>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">BasicDataSource.js</a>,
                <a href="#">line 176</a>
              </li>
            </ul>
          </dd>
        </dl>
  
        <h5>Example</h5>
  
        <pre
          class="prettyprint"
        ><code><span class="com">// 注意 ：必需实现一个实例化对象的实现方法</span></code></pre>
  
        <h4 class="name" id="ClearAll">
          <span class="type-signature"></span>ClearAll<span class="signature"
            >()</span
          ><span class="type-signature"></span>
        </h4>
  
        <div class="description">删除全部对象</div>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">BasicDataSource.js</a>,
                <a href="#">line 229</a>
              </li>
            </ul>
          </dd>
        </dl>
  
        <h4 class="name" id="Destroy">
          <span class="type-signature"></span>Destroy<span class="signature"
            >()</span
          ><span class="type-signature"></span>
        </h4>
  
        <div class="description">注销图层组</div>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">BasicDataSource.js</a>,
                <a href="#">line 129</a>
              </li>
            </ul>
          </dd>
        </dl>
  
        <h4 class="name" id="EachMapping">
          <span class="type-signature"></span>EachMapping<span class="signature"
            >(callback)</span
          ><span class="type-signature"></span>
        </h4>
  
        <div class="description">遍历数据对象方法</div>
  
        <h5>Parameters:</h5>
  
        <table class="params">
          <thead>
            <tr>
              <th>Name</th>
  
              <th>Type</th>
  
              <th class="last">Description</th>
            </tr>
          </thead>
  
          <tbody>
            <tr>
              <td class="name"><code>callback</code></td>
  
              <td class="type">
                <span class="param-type">function</span>
              </td>
  
              <td class="description last">回调函数</td>
            </tr>
          </tbody>
        </table>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">BasicDataSource.js</a>,
                <a href="#">line 160</a>
              </li>
            </ul>
          </dd>
        </dl>
  
        <h4 class="name" id="formatPostion">
          <span class="type-signature"></span>formatPostion<span class="signature"
            >(Postion)</span
          ><span class="type-signature"> → {Object}</span>
        </h4>
  
        <div class="description">格式化坐标点 屏幕X，Y 值转换为 经纬度坐标值</div>
  
        <h5>Parameters:</h5>
  
        <table class="params">
          <thead>
            <tr>
              <th>Name</th>
  
              <th>Type</th>
  
              <th class="last">Description</th>
            </tr>
          </thead>
  
          <tbody>
            <tr>
              <td class="name"><code>Postion</code></td>
  
              <td class="type">
                <span class="param-type">Object</span>
              </td>
  
              <td class="description last">屏幕XY值</td>
            </tr>
          </tbody>
        </table>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">BasicDataSource.js</a>,
                <a href="#">line 292</a>
              </li>
            </ul>
          </dd>
        </dl>
  
        <h5>Returns:</h5>
  
        <div class="param-desc">经纬度坐标对象</div>
  
        <dl>
          <dt>Type</dt>
          <dd>
            <span class="param-type">Object</span>
          </dd>
        </dl>
  
        <h4 class="name" id="GetMappingById">
          <span class="type-signature"></span>GetMappingById<span
            class="signature"
            >(id)</span
          ><span class="type-signature"> → {Entity}</span>
        </h4>
  
        <div class="description">通过ID 获取对象值</div>
  
        <h5>Parameters:</h5>
  
        <table class="params">
          <thead>
            <tr>
              <th>Name</th>
  
              <th>Type</th>
  
              <th class="last">Description</th>
            </tr>
          </thead>
  
          <tbody>
            <tr>
              <td class="name"><code>id</code></td>
  
              <td class="type">
                <span class="param-type">String</span>
              </td>
  
              <td class="description last">子对象唯一标识</td>
            </tr>
          </tbody>
        </table>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">BasicDataSource.js</a>,
                <a href="#">line 193</a>
              </li>
            </ul>
          </dd>
        </dl>
  
        <h5>Returns:</h5>
  
        <div class="param-desc">Entity 子对象</div>
  
        <dl>
          <dt>Type</dt>
          <dd>
            <span class="param-type">Entity</span>
          </dd>
        </dl>
  
        <h4 class="name" id="Remove">
          <span class="type-signature"></span>Remove<span class="signature"
            >(id)</span
          ><span class="type-signature"></span>
        </h4>
  
        <div class="description">通过元素 ID 删除单个对象</div>
  
        <h5>Parameters:</h5>
  
        <table class="params">
          <thead>
            <tr>
              <th>Name</th>
  
              <th>Type</th>
  
              <th class="last">Description</th>
            </tr>
          </thead>
  
          <tbody>
            <tr>
              <td class="name"><code>id</code></td>
  
              <td class="type">
                <span class="param-type">String</span>
              </td>
  
              <td class="description last">唯一标识</td>
            </tr>
          </tbody>
        </table>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">BasicDataSource.js</a>,
                <a href="#">line 216</a>
              </li>
            </ul>
          </dd>
        </dl>
  
        <h4 class="name" id="RemoveEntitys">
          <span class="type-signature"></span>RemoveEntitys<span class="signature"
            >(Entitys)</span
          ><span class="type-signature"></span>
        </h4>
  
        <div class="description">删除图层元素</div>
  
        <h5>Parameters:</h5>
  
        <table class="params">
          <thead>
            <tr>
              <th>Name</th>
  
              <th>Type</th>
  
              <th class="last">Description</th>
            </tr>
          </thead>
  
          <tbody>
            <tr>
              <td class="name"><code>Entitys</code></td>
  
              <td class="type">
                <span class="param-type">Array</span>
              </td>
  
              <td class="description last">元素集合</td>
            </tr>
          </tbody>
        </table>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">BasicDataSource.js</a>,
                <a href="#">line 251</a>
              </li>
            </ul>
          </dd>
        </dl>
  
        <h4 class="name" id="RemoveLayer">
          <span class="type-signature"></span>RemoveLayer<span class="signature"
            >(DataSource)</span
          ><span class="type-signature"></span>
        </h4>
  
        <div class="description">删除图层组</div>
  
        <h5>Parameters:</h5>
  
        <table class="params">
          <thead>
            <tr>
              <th>Name</th>
  
              <th>Type</th>
  
              <th class="last">Description</th>
            </tr>
          </thead>
  
          <tbody>
            <tr>
              <td class="name"><code>DataSource</code></td>
  
              <td class="type">
                <span class="param-type">DataSource</span>
              </td>
  
              <td class="description last">删除子图层</td>
            </tr>
          </tbody>
        </table>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">BasicDataSource.js</a>,
                <a href="#">line 275</a>
              </li>
            </ul>
          </dd>
        </dl>
  
        <h4 class="name" id="RemoveMultiEntity">
          <span class="type-signature"></span>RemoveMultiEntity<span
            class="signature"
            >(idArray)</span
          ><span class="type-signature"></span>
        </h4>
  
        <div class="description">通过ID数组删除多个元素对象</div>
  
        <h5>Parameters:</h5>
  
        <table class="params">
          <thead>
            <tr>
              <th>Name</th>
  
              <th>Type</th>
  
              <th class="last">Description</th>
            </tr>
          </thead>
  
          <tbody>
            <tr>
              <td class="name"><code>idArray</code></td>
  
              <td class="type">
                <span class="param-type">Array</span>
              </td>
  
              <td class="description last">唯一标识数组</td>
            </tr>
          </tbody>
        </table>
  
        <dl class="details">
          <dt class="tag-source">Source:</dt>
          <dd class="tag-source">
            <ul class="dummy">
              <li>
                <a href="#">BasicDataSource.js</a>,
                <a href="#">line 204</a>
              </li>
            </ul>
          </dd>
        </dl>
      </article>
    </section>
  </div>
  